package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.StuQueryParam;
import com.itheima.pojo.Student;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface StuMapper extends BaseMapper<Student> {

//    List<Student> list(StuQueryParam stuQueryParam);
//@Insert("insert into student(name, no, gender, phone, id_card, is_college, address, degree, graduation_date, clazz_id) " +
//        "values(#{name},#{no},#{gender},#{phone},#{idCard},#{isCollege},#{address},#{degree},#{graduationDate},#{clazzId}) ")
//    void saveStu(Student student);
//@Select("select * from student where id =#{id}")
//    Student findById(Integer id);
//@Update("update student set name =#{name},no =#{no},gender =#{gender},phone =#{phone},degree =#{degree},id_card =#{idCard},is_college =#{isCollege},address =#{address}," +
//        "graduation_date =#{graduationDate},violation_count =#{violationCount},violation_score =#{violationScore} where id =#{id}")
//    void updateStu(Student student);
//
//    void delByIds(@Param("ids") List<Integer> ids);
//@Update("update student set violation_count = violation_count +1 , violation_score = violation_score + #{score} where id = #{id}")
//    void updateViolation(@Param("id") Integer id,@Param("score") Integer score);
    //"id": 7,"name": "Locos","no": "2023001010","gender": 1,"phone": "13712345678","degree": 5,"idCard": "110090110090110090","isCollege": 0,"address": "回龙观东大街110号","graduationDate": "2020-07-01","violationCount": 0,"violationScore": 0,"clazzId": 2
    List<Map> getDegree();

    List<Map> getStuCount();
}
